function queryParams(params) {
	return {
		userName: $('#userName').val(),
	};
}
$('#reset').click(function() {
		 $('#userName').val(""),
		 $('#User').bootstrapTable('refresh', {url: '../UserController/findByCondition.action'});  
		 
});
function findByuserState(data1) {
	
	$.ajax({
		type : "POST",
		url : "../RoleController/findByCondition.action",
		async : false,
		data :  
		{
			"roleId": data1,
		},
		success : function(d) {	
			var obj = eval('(' + d + ')');	
			a=obj[0].roleName;
		},
		
	});
	
 return '<a  style="width:60px; dislpay:inline;overflow:hidden; white-space:nowrap;color:#CD8500">'+a+'</a>';
}




$(function() {

	$("#UserForm").validate({
		rules: {		
			userId:"required",
			userName:"required",
			password:{isPwd:true,},
		    userPhone:"digits"
		},
		errorPlacement: function (label, element) {
            $(element).tooltip('destroy'); /*必需*/
            $(element).attr('title', $(label).text()).tooltip('show'); 
        },
	});
	 $("#datepicker").datepicker({
         language: "zh-CN",
         autoclose: true,//选中之后自动隐藏日期选择框
         format: "yyyy-mm-dd"//日期格式，详见 http://bootstrap-datepicker.readthedocs.org/en/release/options.html#format
     });
	 $("#datepicker1").datepicker({
         language: "zh-CN",
         autoclose: true,//选中之后自动隐藏日期选择框
         format: "yyyy-mm-dd"//日期格式，详见 http://bootstrap-datepicker.readthedocs.org/en/release/options.html#format
     });
	init('User',1170,500,"userId","用户");
	//通过ID插到类型名称
	
	
     

});
